package adv5;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Scanner;

public class Father {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
		System.out.println("请输入年份：");
		int a = input.nextInt();
		Calendar b = Calendar.getInstance();
		b.set(a, Calendar.JUNE, 1);
		int day = b.get(Calendar.DAY_OF_WEEK);
		if (day == Calendar.SUNDAY) {
			b.add(Calendar.DAY_OF_WEEK, 14);
		} else {
			int num = 0;
			while (true) {
				b.add(Calendar.DAY_OF_WEEK, 1);
				if (b.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
					num++;
					if (num == 3)
						break;
				}
			}
		}
		System.out.println(s.format(b.getTime()));
	}

}
